<!doctype html><html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <div class="datalist"><table id="flexigrid" style="display:none"></table></div>
        <script type="text/javascript">
            $(function(){
                $("#flexigrid").flexigrid($.extend(SG.flexOptions, {
                    url: '<?= site_url('general/version/flexigrid') ?>',
                    colModel : [
                        {display: 'ID', name : 'id', width : '100', iskey:true},
                        {display: '<?=translate('GENERAL_VERSION_OLDVERSION')?>', name : 'version', width : '180', process: formatSearch},
                        {display: '<?=translate('GENERAL_VERSION_NEWVERSION')?>', name : 'newversion', width : '180', process: formatSearch},
                        {display: '<?=translate('GENERAL_VERSION_DOWNLOAD_ADDR')?>', name : 'url', width : '50%', process: formatSearch},
                        {display: '<?=translate('MANAGE')?>', name : 'id', width : '150',  sortable: false, process: formatOp},
                    ],
                    buttons: [
                        { name: 'add', displayname: "<?=translate('ADD')?>", title: "<?=translate('ADD')?>", bclass: 'add', onpress: multi },
                        { name: 'delete', displayname: "<?=translate('DEL')?>", title: "<?=translate('DEL')?>", bclass: 'delete', onpress: multi },
                        { separator: true },
                        { name: 'view', displayname: "<?=translate('GENERAL_VERSION_DISPLAY_TIPS', site_url('general/config'))?>", title: "", bclass: 'view'}
                    ],
                    searchitems : true,
                    sortname: "id",
                    sortorder: "desc",
                }));
                SG.admin = $.extend(SG.admin,{
                    add_url:'<?= site_url("general/version/add/") ?>',
                    edit_url:'<?= site_url("general/version/edit/") ?>',
                    del_url:'<?= site_url("general/version/del/") ?>',
                    multi_url:'<?= site_url("general/version/multi/") ?>',
                    table:'{pre}version'
                });
            });
        </script>
    </body>
</html>